/*
 Copyright 2009 Abdulla Abdurakhmanov (abdulla@latestbit.com)
 Original sources are available at www.latestbit.com

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

 EndpointLocation.hpp. Created on: 09.09.2009 16:31:10
 */

#ifndef ENDPOINTLOCATION_HPP_
#define ENDPOINTLOCATION_HPP_

#include "smartobjects/SmartObjectsDefs.hpp"
#include "smartobjects/ISmartBus.hpp"
#include "IEndpointLocation.hpp"
#include "IEndpointCoordinator.hpp"

namespace smartobjects {

class EndpointLocation: public IEndpointLocation {
public:
	SO_DLLPRFX EndpointLocation(const std::string& sCoordinatorName);
	SO_DLLPRFX EndpointLocation(const std::string& sCoordinatorName, URI* poURI);
	SO_DLLPRFX EndpointLocation(ISmartBus* poBus);
	SO_DLLPRFX EndpointLocation(ISmartBus* poBus, URI* poURI);
	SO_DLLPRFX EndpointLocation(ISmartBus* poBus, const std::string& sReference);

	SO_DLLPRFX virtual ~EndpointLocation();

	SO_DLLPRFX virtual Locations& getLocations();
	SO_DLLPRFX virtual void setLocations(const Locations& );
	SO_DLLPRFX virtual void addLocation(URI* poURI);

	SO_DLLPRFX virtual void setCoordinator(const std::string& sCoordinatorName);
	SO_DLLPRFX virtual const std::string& getCoordinator() const;
	SO_DLLPRFX virtual void toStringReference(std::string& sResult) const;

protected:
	Locations m_aLocations;
	std::string m_sCoordinator;
};

}

#endif /* ENDPOINTLOCATION_HPP_ */
